Apparatus for correcting errors in a residue code system

ABSTRACT

A device is provided for correcting errors in the course of the transmission and arithmetical processing of information in digital computers employing a system of residual classes. The device comprises a first arithmetical unit of the computer in which signals corresponding to residues Alpha 1, Alpha 2, ..., Alpha n by the radices P1, P2, ... Pn representing the number to be analyzed are fed to selected inputs of the computer, and a second arithmetical unit to whose inputs signals are fed corresponding to the residues Alpha n 1, Alpha n 2 by the excess radices Pn 1 and Pn 2. The inputs of a constant storage unit are connected to the outputs of the first arithmetical unit whereas the outputs of the storage unit are connected to other common inputs of both arithmetical units for successive conversion of the number to be analyzed to another number of the nth order, the latter being in the same numerical range with the number to be analyzed. An analyzing unit of the two last numbers for zero is connected at its inputs to the second arithmetical unit and at its outputs to the common inputs of both said arithmetical units for detecting an error and a correction number. Finally, a control unit is connected to the inputs of the constant storage unit, the second arithmetical unit and the analyzing unit.

United States Patent [72] Inventors lzrailYaltovlevich Akusllsky Day, vE. C. et al., Rensec: Logical Design for a Residue- Number-System Digital Computer, in RCA Engineer, 9(2): p. 40- 43, August-September, 1963, TK6540.R121.

Mornso n Assistant ExaminerStephen Dildine, Jr. Attorney-Waters, Roditi, Schwartz & Nissen- ABSTRACT: A device is provided for correcting errors in the course of the transmission and arithmetical processing of information in digital computers employing a system of residual clases. The device comprises a first arithmetical unit of the computer in which signals corresponding to residues 11,, a a, by the radices P P,, P, representing the number to be analyzed are fed to selected inputs of the computer, and a second arithmetical unit to whose inputs signals are fed corresponding to the residues a a by the excess radices P and P The inputs of a constant storage unit are connected to the outputs of the first arithmetical unit whereas the outputs of the storage unit are connected to other common inputs of both arithmetical units for successive conversion of the number to be analyzed to another number of the nth order, the latter being in the same numerical range with the number to be analyzed. An analyzing unit of the two last numbers for zero is connected at its inputs to the second arithmetical unit and at its outputs to the common inputs of both said arithmeti- ;cal unitsfor detecting an error and a correction number. Finally, a control unit is connected to the inputs of the constant storage unit, the second arithmetical unit and the analyzing unit.

I SI'OEAGE Uzi/l 7 yen/menu: my 4 3 I ri- "q I 5 5 5 5 5 5 i l l x I g 1 3 V 1 1 PM i i man: 0/2 54:: 810676) .9 i 2| II I L J 5 r-'- 1/ 13 1 7 l2 1 l /0 C0/V7A0L l 7 I UNIT 1- I l rouse; r 7 l 1 I l 1 l l l 7 1 LL: l

APPARATUS FOR QORRECTING ERRORS INA RESIDUE CODE SYSTEM The present invention relates to the correction of errors in residue code systems.

Methods known heretofore for correcting errors in numbers are based, principally, on the fact that the numbers are accompanied by multidigit or modulus additional numbers representing the general characteristics of the initial numbers. (Cf. US. Pat. Nos. 2,969,912 and 2,919,854, class 235453.) These methods are convenient for the transfer or transmission of numbers, but due to their nonarithmetical nature, they require a rather complicated equipment for being applicable when correcting errors which may arise when certain operations areperformed in the arithmetic unit of the digital computer.

An object of the present invention is to eliminate the above disadvantages. I

Another and more specific object of the invention is to provide a method for correcting errors in the course of the transmision and arithmetical processing of information in digital computers which employ a system of residual classes with redundant coding of information and a device for implementing such method.

In accordance with said and other objects the present invention resides in a method for correcting errors which consists in that two additional radices or bases P and P are introduced, said additional radices or bases being greater than any radix or base P P,,..,P,,, of the working range and such that P,, -P,, g3P,,-P,,,, numbers represented by their residues at a,,..., (1 a in the extended system of radices or bases P,, P,,..., P,,,,, P are operated upon, the final result is checked or analyzed for the presence of an error, and the digit containing the error is found, for which purpose according to the first digit of the obtained number a constant is selected from a given set of constants, said constant comprising the number of digits equal to the number of the radices or bases in the system and being such that upon subtracting it from said number the first digit be zero; according to the second digit of the difl'er'ence thus obtained the second constant is selected from the given set, such that upon subtracting it from the first difference zero be obtained in the second digit of said difference, the procedure being continued up to the nth digit, after which the last two digits of the system are analyzed and by the result of the analysis the value and place of the correction digit is unequivocally detemtined, the true digit being obtained by adding said correction digit to the erroneous one.

The device for implementing the method described above comprises an arithmetic unit for processing digits to the radices or bases P and P being introduced, said arithmetic unit being coupled to the arithmetic unit of the digital computer, a constant storage unit connected with said arithmetic units, a unit for checking two last digits of the number for zero coupled to the arithmetic unit of the computer and determining the location of the erroneous digit and also the correction digit, which is to be added to the erroneous digit to obtain the true digit of the number.

For a better understanding of the present invention given below is a description thereof, to be had in conjunction with the accompanying drawing in which the block diagram of the proposed device for correcting errors is represented.

In the invention proposed herein a method is disclosed for correcting errors in digital computers on the basisof nonpositional redundant codes in a system of residual classes both in the course of transfer or transmission and in the course of arithmetical processing of digital information.

Let us consider a system of residual classes with relatively prime radices or bases In this system any integer A in the interval (0,P), where P=P P,...P,, is represented in the form h '12P"! n)! where a, is the residue from the division of A by the radix or base P but since Let us additionally introduce two radices or bases P and P mutually prime with any P, from (1) as well as with :respect to each other and satisfying the condition n+Z n+I I and let us represent numbers in this extended system 1 0 .1 ir" n: n+1 a+2)- This means that we shall representnumbers in the computer and perform operations upon numbers lying within a wider range (0,P), where Since we consider the working range, i.e., the range within which there lie the numbers being treated and results of operations performed upon them, to be (0,p), it is obvious, that if at any stage of processing it happens that A p, then an error has taken place in the course of processing. We shall call numbers less than p proper and those greater than p improper." We shall state without proof the following theorem 1 which concerns the distribution of the values of A over various intervals of the range (0,P).

Theorem 1 Let sr b--- m, 8, i-Hr" n+2) denote a sequence P, of numbers in which the digits to all the radicesor bases except P, are the same and the digit to the radix or base P, takes values 0,l,...,P,-,,.

Then within each of the intervals :=(i( r) (j d) J'= .-u' there is onenumber from this sequence.

Let us point out an important corollary which follows from this theorem l.

Corollary There exists only one value S a, such that the number A lies in the interval (0,P/P,-). Indeed, since in each of the intervals 1, there is one number from the sequence A one of them is sure to lie in the interval l,,=(0,P/P,).

The following theorem is essential for further reasoning.

Theorem 2 Then number A t 2,--, m n+1, n-l-Z) is improper.

Proof The proper character of the number A means that n+l n+2) i.e. A is an improper number.

This theorem establishes an important fact, that any dislor tion of a digit to any radix or base converts the respective number into an improper one and, hence, the presence of an error may be detected. Moreover, it has been shown, that there exists one and only one value of this digit which may convert theimproper number into the proper one.

Hence, if the presence of an error is detected, then in order to correct it only its location should be determined, i.e. which digit is erroneous. After that the correct digit is determined unequivocally.

Theorem 2 may be generalized as follows.

Theorem 3 1 Let P P ,...,P,-, be sucl p from among the radices or bases of the system that P,,,P,,...P,=P P, P Then the number A in which digits to all these radices or bases or to some of them are erroneous, is improper. This t heorem 3 immediately follows from theorem 2 if we regard P as one radix or base of the system. Then the condition under which theorem 2 holds is satisfied and the number in which a digit to the radix or base P is erroneous, is improper.

An error in the digit to the radix or base F may affect digits to any number of radices or bases constituting F.

Since each of the introduced check radices or bases is chosen to be greater than any radix or base within the working range, then whatever he the two radices or bases of the extended system P, and P,, M

PIP! f IM' rHa will always hold.

Therefore, a number with a double error, i.e. with two erroneous digits will always be improper and hence the presence of such an error may always be detected.

Thus, in order to detect the presence or establish the absence of an error in the number A it should be compared with the number p. If it turns out thatAz then an error has taken place, at least in one digit.

As a basic method to realize in residual classes the detection of an error in the number A, a method should be adopted which we shall here and hereafter call the method of nullevizatioq and which consists in successive passing from the number A over to the number A, in which the digit to the radix or base P, is equal to zero, then over to A, in which not only said digit to the base P, is equal to zero, but also the digit to the radix or base P and so on.

i The nullevization is attained by means of successive subtractions from 1, 3,, A etc. of corresponding constants selected from the following set stored in the digital computer.

C n, in, n+1) 1: n+2) 1l 1 2 y 22) 7 2 11+! 2; n+2) 22 P2 1 C =0, 0, 0, t t +1, t +2)t =1, 2,

The process of nullevization for establishing the very fact'of the presence of an error, i.e. checking of the number Z=(a,, 01 a a consists ofthefollowing steps:

Step 1.. Computing of A,=A C '=(O,' S i ,f' S S',. where 6' isa constant from the set C in whichnF-a Step 2. Computing of ZZ=ZI-G, 0,0,s, ..,s S n where C is a constant from the set Cf, in whi h IZFSJ. Wm.-.

Step N. Computing of I Z,, C',,= (0,0,...,0,S",, 5", where C is a constant from the set C,.'"", in which all I if in the number 1,, thus ObtairECTEh e dTgTQS QJILF LQEF e ual to zero, then the number 1 is proper; if otherwise, i.e., if at least one of these digits differs from zero, then the number I is improper.

Note: If, when carrying out the nullevization, a number has been obtained at step i which contains a zero digit to the radix or base P as well, then step i+l should be omitted and the following step i+2 is to be performed.

1 The set of constants for checking the presence or establishing the absence of errors comprises P,+P +...+P,,n constants.

For determining the location and value of a possible error the following method may be employed. if the system of radices or bases is selected so that there holds n+l art-2Z (PM!) then there is a one-to-one correspondence between the combination of digits 5", S and the value and location of the error.

lndeed, let there take place an error A01, in the digit a,- to the lradix or base P,.

Then the number is no longer proper and happens to be either in the interval (jp, (i+lp), or in the interval ((j-l-Up, H2)p) depending on the value of the number, where the number of the intervalj is determined as being determinal by the condition nz,-(P/P,-)(mod P,-)=l. Hence, in order that the error An, in the digit to the radix or base P, should not be in the interval with the same number as the error Au,- in the digit to the radix or base Pj, where i.j= l,2 ,....n, the relation I should hold, which is satisfied, if P. P 2 3 P,P, For this relation to hold for any radix or base, the relation n+l n+2z nll n is to hold, and, consequently, by the known values of S",. S",, there are also known the value Aa, of the error and its location, viz, the digit number modules P Let us consider an example to illustrate the above-described method of error correction.

Let there be a system of radices or bases P,=2, P 3,.P -,=5, P.,=7, P =l l, P -l 3, for which m,=l, m Z, m =l m =6, m =6, m =3.

The set of nullevization constants will be as follows:

Let us make up a table of correspondence between the values of possible errors and the values of 8",, and S",,

POSSIBLE COMBINATIONS Oh CHECK RADIOES OR BASES Check radices or bases Radices or bases Errors sii-t-l 3 3+: 3.1+:

1 2 a I 4 5 a 6 12 6 1 Pi=2 Aa1=l 7 8 8 10 Pg a Aag=1 Aag=2 6 4 7 6 P =5 Aa =1 Act3=2 8 1 9 3 Aura-=3 =7 Au =1 4 a 9 4 l1 4 1 0 l 0 A =1 P5 11. s 2 0 2 0 3 0 3 l) Aa5=3 as 7 0 7 0 A =8 a o s 0 Aa5=9 PQ S:X B LE corrnrxa'rlgsrspr carer: RADlICES pl I Check radices or bases Badlces or base: Errors 5: 5g

l0 0 1O 0 Pt=13 Aa =1 Aar=5 Am 0 u 0 11 As can be seen from the table, there is an unequivocal correspondence between the result of nullevization and the location and value of the error.

EXAMPLE I Check and correct number A=( l, 2,2,3,l ,4).

First let us nullevize the number A.

Step. 2. (0,1,l,2,0,3)-(0,l,4,4,4,4)=(0,0,2,5,7,l2).

Step. 3. (0,0,2,5,7,l2H0,0,2,5,l,12)=(0,0,0,0,6,0). Hence, the number I is improper and in it S. ,=6, S",, ,=0. Now, referring to the table, we determine that there takes place an error Aa,=6 to the radix or base P =l l.

Now let us correct the error:

Hence, A,,,,=A(0,0,0,0,6,0)=( l,2,2,3,6,4

Indeed, l ,2,2,3,6,4) is a proper number.

' EXAMPLE 2 Check and correct number [i=4 1 ,l,5,5,0,5

Let us nullevi ze the number 1.

Step 1. .J-(l,l,l,l ,l ,l,)=(0,0,4,4,l0,4). 'Step 2. (0,0,4,4,l0,4)-(0,0,4,3,2,l l)=(0,0 ,0, l ,8,6) Step 3. (0,0,0,1,8,6)(0,0,0,l ,l0,3)=(0,0,0,0,9,3).

Then, referring to the table, we determine that there is an error, viz, Aa Ii in the digit to the radix or base p and correct the error: 1

Let us consider the block diagram of the device which realizes the error-correcting method disclosed above.

The device comprises arithmetic unit 1 for processing digits to the introduced redundant radices or bases P, and P,,.,,

coupled to arithmetic unit 2 of the digital computer, constant storage unit 3 connected with the arithmetic units 1 and 2,

. unit 4 for checking two last digits'for zero, which is coupled to chosen to correspond to the number of the employed radices or bases P, of the working range.

According to digits a,,..., (1,, nullevization constants are selected successively from storages 7 of the unit 3. The output 8 of this unit is coupled to the input 9 of the units 1 and 2.

The proposed device operates as follows. The number to be analyzed is fed into the arithmetic units 1, 2 and, via the input 9, to the input registers of the elementary blocks 5. According to the address determined by the number digit to the radix or base P the first nullevization constant is selected from the constant storage unit 3 and subtracted from the contents of the arithmetic unit. According to the value of the number digit to the radix or base P, obtained by this procedure, a successive nullevization constant is selected from the constant storage unit 3 and subtracted from the difference obtained inthe arithmetic unit. 1

Said procedure having been carried out in times according to control signals arriving via terminals 10 and 11 of control unit 12, a completely nullevized number is obtained. in the elementary blocks 6 values 8" and 8",, are formed. Control signals, via terminal 13 of the control unit 12, effect the selection from the unit 4, according to the values of 8" and S",, of the required correction value with the indication of the location of the digit to be corrected and, via input 15 sum it up with the corresponding digit of the initial number stored in the arithmetic unit 2.

I What is claimed is:

l. A device for correcting errorsin the course of the transmission and arithmetical processing of information in digital computers employing a system of residual classes comprising a first arithmetical unit of the computer, in whichsignals cor responding to residues or 0: or}, by the radices P P P, represen "ng the number to be analyzed are fed to selected inputs of said first arithmetical unit; a second arithmetical unit to whoseinputs signals are fed corresponding to the residues o a by the excess radices P and.P +2; a constant storage unit whose inputs are connected to the outputs of the first arithmetical unit. whereas the outputs are connected to other common inputs of both said arithmetical units for successive conversion. of the number to be'analyzed to another number of the nth order, the latter being in the same numeri cal range with the number to be analyzed; an analyzing unit of the two last numbers for zero connected at its inputs to the second arithmetical unit and at its outputs to the common inputs of both said arithmetical units for detecting an error and a correction number; and a control unit connected to the inputs of said constant storage unit, said second arithmetical unit and said analyzing unit. Y v v 

1. A device for correcting errors in the course of the transmission and arithmetical processing of information in digital computers employing a system of residual classes comprising a first arithmetical unit of the computer, in which signals corresponding to residues Alpha 1, Alpha 2,... Alpha n by the radices P1, P2,... Pn representing the number to be analyzed are fed to selected inputs of said first arithmetical unit; a second arithmetical unit to whose inputs signals are fed corresponding to the residues Alpha n 1, Alpha n 2 by the excess radices Pn 1 and Pn 2; a constant storage unit whose inputs are connected to the outputs of the first arithmetical unit whereas the outputs are connected to other common inputs of both said arithmetical units for successive conversion of the number to be analyzed to another number of the nth order, the latter being in the same numerical range with the number to be analyzed; an analyzing unit of the two last numbers for zero connected at its inputs to the second arithmetical unit and at its outputs to the common inputs of both said arithmetical units for detecting an error and a correction number; and a control unit connected to the inputs of said constant storage unit, said second arithmetical unit and said analyzing unit. 